'use strict';
const isProduction = process.env.NODE_ENV === 'production';
module.exports = {
  db: {
    database: 'manage',
    // host: 'localhost',
    // port: 3306,
    host: isProduction ? '10.0.12.4' : 'gz-cynosdbmysql-grp-eqkllq4z.sql.tencentcdb.com',
    port: isProduction ? 3306 : 20556,
    dialect: 'mysql',
    username: 'root',
    password: 'Qwer1234',
    logging: false,
    alter: !isProduction,
    timezone: '+08:00',
    define: {
      charset: 'utf8mb4'
    }
  },
  wx: {
    appId: 'wxeb2c6c4625bb8faa',
    appSecret: '9aa2758af33f9cfa5e952e89a6b3d409',
    loginUrl:
      'https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code'
  },
  // 腾讯云cor配置
  tencentCos: {
    secretId: '',
    secretKey: '',
    bucket: '',
    region: 'ap-guangzhou'
  },
  expiresIn: 60 * 60 * 24 * 30,
  secret:
    '\x88W\xf09\x91\x07\x98\x89\x87\x96\xa0A\xc68\xf9\xecJJU\x17\xc5V\xbe\x8b\xef\xd7\xd8\xd3\xe6\x95*4' // 发布生产环境前，请务必修改此默认秘钥
};
